﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FileTest1.JavaFileOperator
{
    class JavaParameter
    {
        //public string accessModifier;
        public string id;
        public string varType;
        public string varName;
        public string varValue;
        public string code;
        public JavaParameter(string varType, string varName, string varValue)
        {
            this.id = Guid.NewGuid().ToString();
            this.varName = varName;
            this.varType = varType;
            this.varValue = varValue;

            this.code=this.GenerateCode();

        }
        
        public string GenerateCode()
        {
            string c = "";
//             if (c!=null)
//             {
//                 Console.WriteLine("c is not null");
            //yes
//             }
            c += varType + " " + varName;
            if (varValue!=null)
            {
                c += "=" + varValue;
            }
            return c;
        }
    }
}
